<template>
  <div class="centered-heading">
    <h1>欢迎您，{{ message }}</h1>
  </div>
</template>

<script>

import * as TokenFunction from "@/assets/js/TokenFunction";

export default {
  name:"WelcomeAdmin",
  data() {
    return {
      message: ''  // 显示的文本内容
    };
  },

  methods:{
    getUserName(){
      this.message=TokenFunction.getUserInfoFromToken("userName")
    }
  },
  mounted() {
    this.getUserName()
  }
};
</script>

<style scoped>
.centered-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh; /* 使用视口高度来确保在整个屏幕中居中 */
}

h1 {
  font-size: 3rem;
  color: #333;
}
</style>
